fix(recall): exclude archived pages from the session-start digest#491
fix(recall): exclude archived pages from the session-start digest#491boskodev790 wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
build_digest filtered claims against _RETRACTED_CLAIM_STATUSES but passed store.list_pages() through unfiltered, so an archived page's title reached every new session's opening context while its claims stayed suppressed. recall is the one surface that runs unprompted on every SessionStart, so the leak lands in every future session's first turn. synthesize already filters PageStatus.ARCHIVED; this brings recall in line with it, and with the rationale already written on _RETRACTED_CLAIM_STATUSES — otherwise the archive control is decorative. only ARCHIVED is filtered: draft and stale pages stay, mirroring the reasoning that keeps contested claims in the claim set.
12e94c7 to
9e61cad
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
What changed
recall.build_digestnow filters archived pages out of the session-start digest, mirroring the status filter it already applies to claims. onlyPageStatus.ARCHIVEDis excluded — draft and stale pages still appear.Why
fixes #490. claims were filtered against
_RETRACTED_CLAIM_STATUSESbutstore.list_pages()was passed through unfiltered, so an archived page's title kept arriving in every new session's opening context while its claims stayed correctly suppressed.recall is the one surface that runs unprompted on every SessionStart, so the leak reaches every future session's first turn.
synthesize.py:121,124already filtersPageStatus.ARCHIVED, so this brings recall in line with the sibling surface — and with the rationale already written on_RETRACTED_CLAIM_STATUSES(context.py:35): "otherwise the archive/supersede/redact controls are decorative." that argument applies to pages.archiving a page means setting
status: archivedin its frontmatter (the plaintext / obsidian edit path;lifecycle.archiveis claims-only). the status round-trips throughget_pagecorrectly, so this is reachable today.What might break
nothing on disk: no file moves, no field changes shape, and no
kb.*method behaves differently —recallis CLI + SessionStart-hook only, andbuild_digesthas exactly one caller (cli.py:2514).the one visible change for an existing
.vouch/: a KB with archived pages will see those titles disappear fromvouch recalloutput and theN page(s)header count drop accordingly, which is the intent. a KB whose only pages are archived and which has no claims now emits an empty digest, so the SessionStart hook prints nothing instead of an empty pages section.VEP
not a surface change —
recallisn't akb.*method, and the object model, on-disk layout, bundle format and audit-log shape are all untouched. no VEP.Tests
make checkpasses locally (lint + mypy + pytest) — 1379 passed, 49 skipped; ruff clean; mypy clean across 98 source filesCHANGELOG.mdupdated under## [Unreleased]three tests in
tests/test_recall.py, sitting alongside the existingtest_digest_excludes_retracted_claims:test_digest_excludes_archived_pages— verified failing ontestwithout the src changetest_digest_empty_when_only_archived_pages— verified failing ontestwithout the src changetest_digest_keeps_stale_pages— pins that only ARCHIVED is filtered, so a later change can't over-filter draft/staleno ui surface touched, so no screenshots.